package com.data.codegenerate.database.util;

import java.util.List;
import org.apache.commons.lang.StringUtils;

/* compiled from: CodeStringUtils */
public class CodeStringUtils {
    public static String a(String[] strArr) {
        StringBuffer stringBuffer = new StringBuffer();
        for (String str : strArr) {
            if (StringUtils.isNotBlank(str)) {
                stringBuffer.append(",");
                stringBuffer.append("'");
                stringBuffer.append(str.trim());
                stringBuffer.append("'");
            }
        }
        return stringBuffer.toString().substring(1);
    }

    public static String a(String str) {
        if (StringUtils.isNotBlank(str)) {
            return str.substring(0, 1).toLowerCase() + str.substring(1);
        }
        return str;
    }

    public static Integer a(Integer num) {
        if (num == null) {
            return 0;
        }
        return num;
    }

    public static boolean a(String str, String[] strArr) {
        if (strArr == null || strArr.length == 0) {
            return false;
        }
        for (String str2 : strArr) {
            if (str2.equals(str)) {
                return true;
            }
        }
        return false;
    }

    public static boolean a(String str, List<String> list) {
        String[] strArr;
        String[] strArr2 = new String[0];
        if (list != null) {
            strArr = (String[]) list.toArray();
        } else {
            strArr = strArr2;
        }
        if (strArr == null || strArr.length == 0) {
            return false;
        }
        for (String str2 : strArr) {
            if (str2.equals(str)) {
                return true;
            }
        }
        return false;
    }
}
